<?php
/**
 * Created by PhpStorm.
 * User: teddy
 * Date: 15-12-17
 * Time: 下午4:41
 */

namespace teddyphp;

class Money implements \JsonSerializable
{
    private $amount;

    private static $roundingModes = [
        PHP_ROUND_HALF_UP,
        PHP_ROUND_HALF_DOWN,
        PHP_ROUND_HALF_EVEN,
        PHP_ROUND_HALF_ODD
    ];

    public function __construct($amount)
    {
		$this->amount = $amount;
		
    }
    
    public function getAmount()
    {
    	return $this->amount;
    }
    
    public function negate()
    {
    	return new Money(-1 * $this->amount);
    }

    function jsonSerialize()
    {
        // TODO: Implement jsonSerialize() method.
    }
}